Various modeling environments, both textual and graphical, can automatically produce either deployable software systems or descriptions of hardware systems that mimic the behavior of either the entire model or portions of the model. Such production of code from a model is often referred to as “code generation”.
For example, a graphical modeling environment, such as Simulink® from The MathWorks, Inc. of Natick, Mass., caters to various aspects of dynamic system simulation, analysis and design. Simulink® allows users to perform numerous types of tasks including constructing system models through a user-interface for drafting block diagram models, allowing augmentation of a pre-defined set of blocks with custom user-specified blocks, using the block diagram model to compute and trace the temporal evolution of the dynamic system (“executing” the block diagram), and generating code from the model.
Typically, these modeling environments use a single implementation of code during the code generation process and do not allow a user to customize the code based on the availability of multiple implementations of code for a portion of the model or the entire model. As a result, the code that is generated from the code generation process can be insufficient for many applications where specific design requirements need to be met.
It, therefore, is desirable to provide a user with multiple implementations of code for a portion of a model and to allow the user to specify which implementation of code should be used for code generation. Likewise, it is also desirable to allow a user to supply implementations of code for an element in a model, thereby allowing a user to further customize the code that is generated during the code generation process.